package dome4;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 王圆豪
 * Date: 2024-07-15
 * Time: 22:22
 */
public class Good implements Comparable<Good>{
    int v;
    int price;

    public Good(int v, int price) {
        this.v = v;
        this.price = price;
    }

    @Override
    public String toString() {
        return "Good{" +
                "v=" + v +
                ", price=" + price +
                '}';
    }

    @Override
    public int compareTo(Good o) {
        return this.v - o.v;
    }
}
